package com.tangyunlong.mall;

import com.tangyunlong.mall.entity.Manager;
import com.tangyunlong.mall.exception.AccountExistException;
import com.tangyunlong.mall.service.MangerService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ManagerService {
    @Autowired
    private MangerService mangerService;

    @Test
    public void testAdd() {
        Manager manager = new Manager();
        manager.setAccount("root");
        manager.setPassword("123456");
        manager.setStatus("y");
        try {
            mangerService.add(manager);
        }catch (AccountExistException e){

        }
    }
}